import { useGet } from "./useGet";
import { usePost } from "./usePost";

//语义类别管理
export const getInitMessage = async (params: object) => {
    return useGet("/admin/getInitMessage", params);
};
export const addSentenceType = async (body: any) => {
    return usePost("/myData/addSentenceType", body);
};
export const pageTree = async (params: any) => {
    return useGet("/tree/vue/page", params);
};
export const groupTree = async (params: any) => {
    return useGet("/tree/vue/groupTree", params);
};
export const listTree = async (params: any) => {
    return useGet("/tree/vue/list", params);
};
export const deleteTree = async (typeId: any) => {
    return useGet("/tree/vue/delete", {
        ids: typeId
    });
};
export const saveTree = async (body: any) => {
    return usePost("/tree/vue/save", body);
};

//关键词管理
export const listKeyWordType = async (params: any) => {
    return useGet("/keywordType/vue/list", params);
};
export const deleteKeyWordType = async (typeId: any) => {
    return useGet("/keywordType/vue/delete", {
        ids: typeId
    });
};
export const saveKeyWordType = async (body: any) => {
    return usePost("/keywordType/vue/save", body);
};
//语句管理
export const pageSentence = async (params: any) => {
    return useGet("/sentence/vue/page", params);
};
export const deleteSentence = async (params: any) => {
    return useGet("/sentence/vue/delete", params);
};
export const saveSentence = async (params: any) => {
    return usePost("/sentence/vue/save", params);
};

//qa管理
export const pageQa = async (params: any) => {
    return useGet("/qa/vue/page", params);
};
export const deleteQa = async (params: any) => {
    return useGet("/qa/vue/delete", params);
};
export const saveQa = async (params: any) => {
    return usePost("/qa/vue/save", params);
};

//配置管理
export const pageConfig = async (params: any) => {
    return useGet("/sentence/config/vue/page", params);
};
export const deleteConfig = async (params: any) => {
    return useGet("/sentence/config/vue/delete", params);
};
export const useConfig = async (params: any) => {
    return useGet("/sentence/config/vue/use", params);
};
export const initModel = async (params: any) => {
    return useGet("/sentence/config/vue/init", params);
};

export const getStatus = async (params: any) => {
    return useGet("/sentence/config/vue/getStatus", params);
};
export const saveConfig = async (params: any) => {
    return usePost("/sentence/config/vue/save", params);
};